﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace Management.Core
{
    public class Role
    {
        [Key]
        public int RoleID { get; set; }

        [Required(ErrorMessage = "必填")]
        [Display(Name = "名称")]
        public string Name { get; set; }

        [Required()]
        [Display(Name = "创建时间")]
        public DateTime Created_at { get; set; }

        [Required()]
        [Display(Name = "更新时间")]
        public DateTime Updated_at { get; set; }

        public virtual ICollection<AdminRole.AdminRole> AdminRole { get; set; }

        public virtual ICollection<RolePermission.RolePermission> RolePermission { get; set; }
    }
}
